package com.tute.yygh.hosp.controller;

import com.tute.yygh.hosp.service.HospitalSetService;
import com.tute.yygh.model.hosp.HospitalSet;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author:田增印
 * @Date:2021/3/21
 * @Time:16:09
 * @Description:com.tute.yygh.hosp.controller
 * @VERSION:1.0.0
 */
@Api("医院设置控制器")
@RestController
@RequestMapping("/admin/hosp/hospitalSet")
public class HospitalSetController {
    @Autowired
    private HospitalSetService hospitalSetService;

    //查询医院设置表的所有信息
    @ApiOperation("查询医院设置表的所有信息")
    @GetMapping("findAll")
    public List<HospitalSet> findAllHospitalSet(){
        List<HospitalSet> list = hospitalSetService.list();
        return list;
    }
    //2.逻辑删除医院设置
    @ApiOperation("逻辑删除医院设置")
    @ApiImplicitParam(name = "id", value = "医院设置id")
    @DeleteMapping("{id}")
    public  boolean removeHospSet(@PathVariable Long id){
        boolean b = hospitalSetService.removeById(id);
        return b;
    }
}
